﻿<phone:PhoneApplicationPage 
    x:Class="Studio77.CrazyJigsaw.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="StoryboardTabTip">
			<ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="txtTip" d:IsOptimized="True"/>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="txtTip">
				<EasingDoubleKeyFrame KeyTime="0" Value="0.8"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.2"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.9"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Style x:Key="ButtonStyleStart" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ColorAnimation Duration="0" To="#FFFBCE2C" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<ColorAnimation Duration="0" To="#FFD4A235" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<ColorAnimation Duration="0" To="#FF7A5609" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<ColorAnimation Duration="0" To="#FFCEA650" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="border" BorderBrush="#FF6A6A6A" BorderThickness="1" CornerRadius="7">
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FFB80303" Offset="0"/>
										<GradientStop Color="#FF6C1E1E" Offset="0.991"/>
										<GradientStop Color="#FFB80303" Offset="0.772"/>
										<GradientStop Color="#FFE46969" Offset="0.336"/>
									</LinearGradientBrush>
								</Border.Background>
							</Border>
							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyleContinue" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ColorAnimation Duration="0" To="#FFFBCE2C" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<ColorAnimation Duration="0" To="#FFD4A235" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<ColorAnimation Duration="0" To="#FF7A5609" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="border" BorderBrush="#FF6A6A6A" BorderThickness="1" CornerRadius="7">
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FF8D8D8D" Offset="0"/>
										<GradientStop Color="#FF353535" Offset="0.991"/>
										<GradientStop Color="#FFC2C2C2" Offset="0.284"/>
									</LinearGradientBrush>
								</Border.Background>
							</Border>
							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Storyboard x:Name="StoryboardStartBtn">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="btnStart">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1.05">
					<EasingDoubleKeyFrame.EasingFunction>
						<CircleEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<CircleEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="btnStart">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1.05">
					<EasingDoubleKeyFrame.EasingFunction>
						<CircleEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<CircleEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Style x:Key="ButtonStyleSoundOn" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<Image Source="Images/soundon2.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyleSoundOff" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<Image Source="Images/soundoff2.png" Stretch="Fill"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Viewbox>

		<!--LayoutRoot 是包含所有页面内容的根网格-->
		<Grid x:Name="LayoutRoot" Background="#FFA7A7A7" Height="800" Width="480">
			<Image Source="/Images/background.jpg" Grid.RowSpan="2" Stretch="UniformToFill" Opacity="0.15"/>
			<TextBlock TextWrapping="Wrap" Text="Crazy" VerticalAlignment="Top" FontSize="96" Margin="37.5,134,91.5,0" Foreground="White" FontFamily="Arial Black" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto">
				<TextBlock.RenderTransform>
					<CompositeTransform Rotation="-15.139"/>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock TextWrapping="Wrap" Text="Crazy" VerticalAlignment="Top" FontSize="96" Margin="33,131,96,0" FontFamily="Arial Black" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto">
				<TextBlock.Foreground>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FF470000" Offset="0"/>
						<GradientStop Color="Red" Offset="1"/>
					</LinearGradientBrush>
				</TextBlock.Foreground>
				<TextBlock.RenderTransform>
					<CompositeTransform Rotation="-15.139"/>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock TextWrapping="Wrap" Text="Jigsaw" VerticalAlignment="Top" FontSize="96" Margin="120,201.5,9,0" Foreground="White" FontFamily="Segoe WP Black" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto">
				<TextBlock.RenderTransform>
					<CompositeTransform Rotation="-15.139"/>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock TextWrapping="Wrap" Text="Jigsaw" VerticalAlignment="Top" FontSize="96" Margin="115.5,198.5,13.5,0" Foreground="#FF291C00" FontFamily="Segoe WP Black" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto">
				<TextBlock.RenderTransform>
					<CompositeTransform Rotation="-15.139"/>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock HorizontalAlignment="Right" Grid.Row="1" TextWrapping="Wrap" Text="疯狂拼图" VerticalAlignment="Bottom" Margin="0,0,160,631" FontSize="32" RenderTransformOrigin="0.5,0.5" FontFamily="Arial" Foreground="White" UseLayoutRounding="False" d:LayoutRounding="Auto" FontWeight="Bold">
				<TextBlock.RenderTransform>
					<CompositeTransform Rotation="-15.139"/>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="疯狂拼图" VerticalAlignment="Bottom" Margin="0,0,162.5,632" FontSize="32" RenderTransformOrigin="0.5,0.5" FontFamily="Arial" UseLayoutRounding="False" d:LayoutRounding="Auto" FontWeight="Bold">
				<TextBlock.Foreground>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFF90808" Offset="0"/>
						<GradientStop Color="#FF740000" Offset="1"/>
					</LinearGradientBrush>
				</TextBlock.Foreground>
				<TextBlock.RenderTransform>
					<CompositeTransform Rotation="-15.139"/>
				</TextBlock.RenderTransform>
			</TextBlock>
			<Image Source="Images/logo77.png" Stretch="Fill" Margin="8,0,0,8" Height="32" VerticalAlignment="Bottom" Width="111" HorizontalAlignment="Left" RenderTransformOrigin="0.5,0.5"/>
			<TextBlock x:Name="txtTip" Margin="0,0,0,100" TextWrapping="Wrap" Text="Tap screen to continue..." VerticalAlignment="Bottom" HorizontalAlignment="Center" Foreground="#FF181818" FontSize="26.667" Visibility="Collapsed"/>
			<Button x:Name="btnStart" Content="START" Height="73" Margin="0,0,0,211" Style="{StaticResource ButtonStyleStart}" VerticalAlignment="Bottom" FontSize="37.333" Foreground="#FFFFF5C5" FontFamily="Segoe WP Black" Width="260" HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5">
				<Button.RenderTransform>
					<CompositeTransform/>
				</Button.RenderTransform>
			</Button>
			<Button x:Name="btnContinue" Content="CONTINUE" Height="60" Margin="0,0,0,107" Style="{StaticResource ButtonStyleContinue}" VerticalAlignment="Bottom" FontSize="24" Foreground="Black" FontFamily="Segoe WP Black" Width="180" HorizontalAlignment="Center"/>
			<Button x:Name="btnSoundOff" Content="Button" HorizontalAlignment="Right" Height="39" Margin="0,0,8,8" Style="{StaticResource ButtonStyleSoundOff}" VerticalAlignment="Bottom" Width="39" Visibility="Collapsed"/>
			<Button x:Name="btnSoundOn" Content="Button" HorizontalAlignment="Right" Height="39" Margin="0,0,8,8" Style="{StaticResource ButtonStyleSoundOn}" VerticalAlignment="Bottom" Width="39"/>

		</Grid>
 
	</Viewbox>
 
    <!--演示 ApplicationBar 用法的示例代码-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="按钮 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="按钮 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="菜单项 1"/>
                <shell:ApplicationBarMenuItem Text="菜单项 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>